package test01;

import java.util.Scanner;

public class demo05 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.print("年:");
        int year=sc.nextInt();
        System.out.print("月:");
        int month=sc.nextInt();
        System.out.print("日:");
        int day=sc.nextInt();
        int count=0;        //存储这个月之前的所有天数
        for(int i=1;i<month;i++){
            if(i==1 || i==3 || i==5 || i==7 || i==8 || i==10 || i==12){
                count+=31;
            }else{
                if(year%4==0 && i==2){
                    count+=29;
                }else if(year%4!=0 && i==2){
                    count+=28;
                }else{
                    count+=30;
                }
            }
        }
        System.out.println("这是当年的第"+(count+day)+"天");
    }
}
